#include "viewer-editable-lossy.h"

G_DEFINE_INTERFACE (ViewerEditableLossy, viewer_editable_lossy, VIEWER_TYPE_EDITABLE)


static void
viewer_editable_lossy_default_init (ViewerEditableLossyInterface *iface)
{
    g_print("calling %s\n", __func__);
    /* add properties and signals to the interface here */
}

//依赖ViewerEditable::save
void viewer_editable_lossy_compress (ViewerEditableLossy  *self) {
    ViewerEditableLossyInterface *vel_iface;

    g_return_if_fail (VIEWER_IS_EDITABLE_LOSSY (self));

    vel_iface = VIEWER_EDITABLE_LOSSY_GET_IFACE (self);
    g_return_if_fail (vel_iface->compress != NULL);
    vel_iface->compress (self);

    viewer_editable_save(VIEWER_EDITABLE(self), NULL);
}
